package com.accp.electronicdocumentmanagementsystem.biz;

import com.accp.electronicdocumentmanagementsystem.dao.CategorMapper;
import com.accp.electronicdocumentmanagementsystem.pojo.Categor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Categorbiz {

    @Autowired(required = false)
    private CategorMapper categorMapper;

    public boolean insertCategor(Categor categor){
        return categorMapper.insert(categor) > 0;
    }
    public boolean deleteCategor(Long id){
        return categorMapper.deleteByPrimaryKey(id) > 0;
    }
    public boolean updateCategor(Categor categor){
        return categorMapper.updateByPrimaryKey(categor) > 0;
    }
    public List<Categor> selectAll(){
        return categorMapper.selectAll();
    }
}
